set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

add_executable(rtspService2 main.cpp rtp.cpp)

if(WIN32)
    target_link_libraries(rtspService2 ws2_32)
    if(MSVC)
        target_compile_options(rtspService2 PRIVATE /wd4996)
    else()
        target_compile_options(rtspService2 PRIVATE -Wno-deprecated-declarations)
    endif()
else()
    # Linux环境链接其他库
    target_link_libraries(rtspService2 pthread)
endif()